<?php

namespace common\models\tmall1;

use Yii;

/**
 * This is the model class for table "tmall1.order_info".
 *
 * @property integer $uid
 * @property string $ordersn
 * @property integer $member_uid
 * @property integer $type
 * @property integer $addtime
 * @property integer $sendtime
 * @property integer $status
 * @property integer $pay_result
 * @property string $consignee
 * @property string $s1
 * @property string $s2
 * @property string $s3
 * @property string $address
 * @property string $zipcode
 * @property string $cell
 * @property string $tel
 * @property string $order_email
 * @property integer $pay_id
 * @property string $pay_name
 * @property string $defaultbank
 * @property integer $delivery_id
 * @property string $delivery_name
 * @property string $delivery_code
 * @property integer $delivery_time
 * @property string $goods_amount
 * @property string $order_amount
 * @property double $member_money
 * @property double $reduce_amount
 * @property integer $point
 * @property double $point_amount
 * @property integer $coupon_id
 * @property string $coupon_code
 * @property double $coupon_amount
 * @property double $ship_amount
 * @property string $lifecard_code
 * @property double $lifecard_amount
 * @property double $hongbao_amount
 * @property integer $goods_point
 * @property integer $is_invoice
 * @property string $invoice
 * @property string $remark
 * @property string $admin_memo
 * @property integer $modify_time
 * @property integer $ispick
 * @property string $busidate
 * @property string $voideddate
 * @property string $canceldate
 * @property string $discount_amount
 * @property integer $isnewyear
 * @property integer $jfs
 * @property integer $box_order_id
 * @property integer $box_type
 * @property integer $is_comment
 * @property integer $origin
 */
class OrderInfo extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tmall1.order_info';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['member_uid', 'type', 'addtime', 'sendtime', 'status', 'pay_result', 'pay_id', 'delivery_id', 'delivery_time', 'point', 'coupon_id', 'goods_point', 'is_invoice', 'modify_time', 'ispick', 'isnewyear', 'jfs', 'box_order_id', 'box_type', 'is_comment', 'origin'], 'integer'],
            [['goods_amount', 'order_amount', 'member_money', 'reduce_amount', 'point_amount', 'coupon_amount', 'ship_amount', 'lifecard_amount', 'hongbao_amount', 'discount_amount'], 'number'],
            [['admin_memo'], 'string'],
            [['busidate', 'voideddate', 'canceldate'], 'safe'],
            [['ordersn', 's1', 's2', 's3', 'defaultbank', 'delivery_name'], 'string', 'max' => 30],
            [['consignee', 'coupon_code', 'lifecard_code'], 'string', 'max' => 60],
            [['address', 'remark'], 'string', 'max' => 255],
            [['zipcode'], 'string', 'max' => 10],
            [['cell'], 'string', 'max' => 11],
            [['tel'], 'string', 'max' => 50],
            [['order_email'], 'string', 'max' => 160],
            [['pay_name', 'delivery_code', 'invoice'], 'string', 'max' => 40],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uid' => '订单自增长id',
            'ordersn' => '订单号',
            'member_uid' => '会员uid',
            'type' => '订单类型',
            'addtime' => '订单添加时间',
            'sendtime' => 'Sendtime',
            'status' => '订单状态',
            'pay_result' => '支付结果：1成功 0失败',
            'consignee' => '收货人',
            's1' => '省',
            's2' => '市',
            's3' => '区县',
            'address' => '街道',
            'zipcode' => '邮编',
            'cell' => '手机',
            'tel' => '电话',
            'order_email' => 'Order Email',
            'pay_id' => '支付方式id',
            'pay_name' => '支付方式名称',
            'defaultbank' => '银行简码',
            'delivery_id' => '送货方式id',
            'delivery_name' => '送货方式名称',
            'delivery_code' => '快递号码',
            'delivery_time' => '送货时间 取值1 2 3',
            'goods_amount' => '商品总金额',
            'order_amount' => '订单总金额',
            'member_money' => '余额支付金额',
            'reduce_amount' => '满额减优惠金额',
            'point' => '抵扣的积分值',
            'point_amount' => '抵扣的积分金额',
            'coupon_id' => '优惠券id',
            'coupon_code' => '优惠券代码',
            'coupon_amount' => '优惠券金额',
            'ship_amount' => '运费',
            'lifecard_code' => '生活卡代码',
            'lifecard_amount' => '生活卡抵扣金额',
            'hongbao_amount' => 'Hongbao Amount',
            'goods_point' => '购物获得的积分',
            'is_invoice' => '是否开发票 1开 0不开',
            'invoice' => 'Invoice',
            'remark' => 'Remark',
            'admin_memo' => 'Admin Memo',
            'modify_time' => '订单修改时间',
            'ispick' => '拣货标记',
            'busidate' => 'Busidate',
            'voideddate' => '作废日期扣减库存',
            'canceldate' => '取消日期扣减退款',
            'discount_amount' => '商品折扣',
            'isnewyear' => 'Isnewyear',
            'jfs' => 'Jfs',
            'box_order_id' => '宅配盒子订单ID',
            'box_type' => 'Box Type',
            'is_comment' => 'Is Comment',
            'origin' => '0是PC订单 1是微信WAP订单',
        ];
    }
}
